package com.ruyuan.rapid.core.balance;

import com.ruyuan.rapid.common.config.ServiceInstance;
import com.ruyuan.rapid.core.context.RapidContext;

/**
 * 负载均衡最上层的接口定义
 * @author mac
 */
public interface LoadBalance {

    int DEFAULT_WEIGHT = 100;

    int DEFAULT_WARMUP = 5 * 60 * 1000;

    /**
     * 从所有服务实例中选择一台
     * @param rapidContext
     * @return
     */
    ServiceInstance select(RapidContext rapidContext);
}
